<?php
$request = Zend_Controller_Front::getInstance()->getRequest();
$accion = $request->getActionName();
$controlador = $request->getControllerName();
$agregadoUrl = '/accion_origen/' . $accion . '/controlador_origen/' . $controlador;
?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="ISO-8859-1">
        <title>CredyPhone</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">


        <!-- Le styles -->
        <link href="<?php echo $this->baseUrl(); ?>/bootstrap/css/bootstrap.css" rel="stylesheet">
        <style>
            body {
                <?php if (isset($this->colorFondo)) { ?>
                    "background-color:<?php echo $this->colorFondo ?>;"
                <?php } ?>
                padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
            }
            legend { <?php echo "color:" . $this->colorFuente . ";"; ?> }

        </style>
        <link href="<?php echo $this->baseUrl(); ?>/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">

        <!--<script type="text/javascript" src="<?php echo $this->baseUrl(); ?>/js/jquery-1.11.0.min.js"></script>-->
        <script type="text/javascript" src="<?php echo $this->baseUrl(); ?>/js/jquery-1.8.3.js"></script>
        <script type="text/javascript" src="<?php echo $this->baseUrl(); ?>/bootstrap/js/bootstrap.min.js"></script>

        <!-- colourPicker -->
        <link type="text/css" href="<?php echo $this->baseUrl(); ?>/js/jquery.colourPicker/jquery.colourPicker.css" rel="stylesheet"  />
        <script type="text/javascript" src="<?php echo $this->baseUrl(); ?>/js/jquery.colourPicker/jquery.colourPicker.js"></script>
        <!-- END colourPicker -->

        <!-- DatePicker UI -->
        <link rel="stylesheet" href="<?php echo $this->baseUrl("/js/jquery-datepicker/css/ui-lightness/jquery-ui-1.9.2.custom.min.css"); ?>" />
        <script type="text/javascript" src="<?php echo $this->baseUrl("/js/jquery-datepicker/js/jquery-ui-1.9.2.custom.min.js"); ?>"></script>
        <!-- end validate -->

        <!-- validate -->
        <script type="text/javascript" src="<?php echo $this->baseUrl("/js/jquery-validate/jquery.validate.min.js"); ?>"></script>
        <script type="text/javascript" src="<?php echo $this->baseUrl("/js/jquery-validate/additional-methods.min.js"); ?>"></script>
        <!-- end validate -->
        <!-- colorbox -->
        <link type="text/css" href="<?php echo $this->baseUrl(); ?>/js/colorbox/css/colorbox.css" rel="stylesheet" />
        <script src="<?php echo $this->baseUrl(); ?>/js/colorbox/jquery.colorbox.js"></script>
        <!-- END  colorbox-->

        <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
          <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        <!-- Le fav and touch icons -->
        <link rel="shortcut icon" href="<?php echo $this->baseUrl(); ?>/bootstrap/ico/favicon.ico">
        <link rel="apple-touch-icon-precomposed" sizes="144x144" href="<?php echo $this->baseUrl(); ?>/bootstrap/ico/apple-touch-icon-144-precomposed.png">
        <link rel="apple-touch-icon-precomposed" sizes="114x114" href="<?php echo $this->baseUrl(); ?>/bootstrap/ico/apple-touch-icon-114-precomposed.png">
        <link rel="apple-touch-icon-precomposed" sizes="72x72" href="<?php echo $this->baseUrl(); ?>/bootstrap/ico/apple-touch-icon-72-precomposed.png">
        <link rel="apple-touch-icon-precomposed" href="<?php echo $this->baseUrl(); ?>/bootstrap/ico/apple-touch-icon-57-precomposed.png">
        <?php echo $this->headScript(); ?>
        <?php echo $this->headLink(); ?>
    </head>

    <body>
        <div class="navbar navbar-fixed-top <?php
        if (isset($this->colorMenu)) {
            echo "navbar-inverse";
        }
        ?>">

            <!-- navbar -->
            <div class="navbar navbar-fixed-top <?php echo isset($this->colorMenu) ? "navbar-inverse" : ""; ?>  noPrint" >
                <div class="navbar-inner">
                    <div class="container">
                        <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </a>
                        <a class="brand" href="#">CredyPhone 
                            <?php if ($this->usuario)  ?>
                            <b> <?php echo "(" . $this->usuario->getSucursal()->getDescripcion() . ")"; ?> </b>
                        </a>
                        <!-- user -->
                        <div class="btn-group pull-right">
                            <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
                                <i class="icon-user"></i> 
                                <?php if ($this->usuario) { ?>
                                    <?php echo $this->usuario->getMail(); ?>
                                <?php } else { ?>
                                    <?php echo "Iniciar Session" ?>
                                <?php } ?>
                                <span class="caret"></span>
                            </a>
                            <?php if ($this->usuario) { ?>
                                <ul class="dropdown-menu">
                                    <li><a href="<?php echo $this->baseUrl(); ?>/admin/login/logout/">Salir</a></li>
                                </ul>
                            <?php } ?>
                        </div>
                        <!-- end user -->
                        <!-- option menu -->
                        <div class="nav-collapse">
                            <ul class="nav">
                                <li><a href="<?php echo $this->baseUrl(); ?>/usuarios/">Inicio</a></li>
                                <li class="dropdown">
                                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">Creditos<b class="caret"></b></a>
                                    <ul class="dropdown-menu">
                                        <li><a href="<?php echo $this->baseUrl("/usuarios/credito/registrar/"); ?>">Registrar</a></li>
                                    </ul>
                                </li>
                                <li class="dropdown">
                                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">Personas<b class="caret"></b></a>
                                    <ul class="dropdown-menu">
                                        <li><a href="<?php echo $this->baseUrl("/usuarios/cliente/registrar/"); ?>">Registrar</a></li>
                                        <li><a href="<?php echo $this->baseUrl("/usuarios/busqueda/persona/"); ?>">Buscar</a></li>
                                    </ul>
                                </li>
                                <?php if ($this->usuario->tengoAcceso()) { ?>
                                    <li class="dropdown">
                                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">Administraci&oacute;n<b class="caret"></b></a>
                                        <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                                            <li class="dropdown-submenu">
                                                <a tabindex="-1" href="#">Usuarios</a>
                                                <ul class="dropdown-menu">
                                                    <li><a href="<?php echo $this->baseUrl("/admin/usuario/registrar/"); ?>">Gestión de Usuarios</a></li>
                                                    <li><a href="<?php echo $this->baseUrl("/admin/usuario/permisos/"); ?>">Permisos</a></li>
                                                    <li><a href="<?php echo $this->baseUrl("/admin/usuario/sucursal/"); ?>">Sucursales</a></li>
                                                </ul>
                                            </li>
                                            <li><a href="<?php echo $this->baseUrl(); ?>/admin/configuracion/tasa/">Tasa</a></li>
                                            <li><a href="<?php echo $this->baseUrl(); ?>/admin/configuracion/tasanegocio/">Tasa Negocios</a></li>
                                            <li><a href="<?php echo $this->baseUrl(); ?>/admin/tablas/">Tablas</a></li>
                                            <li><a href="<?php echo $this->baseUrl("/admin/codigo/registrar/"); ?>">Generar Codigo de Acceso</a></li>
                                            <li><a href="<?php echo $this->baseUrl("/admin/index/listabackups/"); ?>">Listado y descarga de Backup</a></li>
                                            <li><a href="<?php echo $this->baseUrl("/admin/index/generarbackup/"); ?>">Generar y enviar Backup</a></li>
                                        </ul>
                                    </li>
                                <?php } ?>
                            </ul>
                        </div>
                        <!-- end option menu -->
                    </div>
                </div>
            </div>
            <!-- end navbar -->

        </div>

        <div class="container-fluid">
            <?php echo $this->layout()->content ?>
        </div><!--/.fluid-container-->

        <hr>
        <footer style="text-align: right;padding-right: 30px;">
            <p>&copy; CredyPhone 2012</p>
        </footer>

    </body>
</html>






